package lab03.test05;

import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;

/**
 * Created by JAVA on 2017/12/13.
 */
public class Test05 {
    public static void main(String[] args) {
        String input="D://Hello";
        Scanner scan=new Scanner(System.in);
        String s;
        char[]a=new char[20];
        char[]b=new char[20];
        File file=new File(input);
        FileWriter out=null;
        try {
            out=new FileWriter(file);
            s=scan.next();
            a=s.toCharArray();
            for (int i=0;i<a.length;i++){
                a[i]=(char)(a[i]+1);
            }
            out.write(a);
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                out.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
            FileReader d=null;
            try {
                d=new FileReader(input);
                d.read(b);
                System.out.println(b);
            } catch (IOException e) {
            } finally {
                try {
                    d.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }

}
